package client;

import java.awt.BorderLayout;
import java.awt.Dialog.ModalityType;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.*;


public class HomePageGUI extends JDialog {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					HomePageGUI frame = new HomePageGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public HomePageGUI() {
		setTitle("\u865A\u62DF\u94F6\u884C\u7CFB\u7EDF");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setModalityType(ModalityType.APPLICATION_MODAL);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblid = new JLabel("\u6BCF\u4E2AID\u53EF\u7533\u8BF7\u4E00\u4E2A\u94F6\u884C\u8D26\u6237\u3002");
		lblid.setFont(new Font("微软雅黑", Font.PLAIN, 12));
		lblid.setBounds(47, 108, 169, 17);
		contentPane.add(lblid);
		
		JLabel label = new JLabel("\u5339\u914D\u4E00\u4E2A\u6D3B\u671F\u8D26\u53F7\uFF0C");
		label.setFont(new Font("微软雅黑", Font.PLAIN, 12));
		label.setBounds(47, 145, 169, 17);
		contentPane.add(label);
		
		JLabel label_1 = new JLabel("\u5E76\u53EF\u5EFA\u7ACB\u591A\u7B14\u5B9A\u671F\u5B58\u6B3E\u3001\u8D37\u6B3E\u9879\u76EE\u3002");
		label_1.setFont(new Font("微软雅黑", Font.PLAIN, 12));
		label_1.setBounds(47, 170, 194, 17);
		contentPane.add(label_1);
		
		JLabel label_3 = new JLabel("Welcome.");
		label_3.setFont(new Font("Centaur", Font.PLAIN, 25));
		label_3.setBounds(36, 22, 122, 39);
		contentPane.add(label_3);
		
		JButton button = new JButton("用户登录");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
				BkUserLoginGUI frame = new BkUserLoginGUI();
				frame.setLocationRelativeTo(null);
				frame.setVisible(true);
				
			}
		});
		button.setFont(new Font("微软雅黑", Font.PLAIN, 15));
		button.setBounds(264, 108, 114, 68);
		contentPane.add(button);
	}
}
